<!--switch-->
<template>
  <el-switch
    v-model="data"
    active-color="#13ce66"
    inactive-color="#787878"
    @change="handleChange"
  >
  </el-switch>
</template>
<script>
export default {
  props: {
    value: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
      data: null
    }
  },
  methods: {
    handleChange () {
      this.$emit('input', this.data)
    }
  },
  created () {
    this.data = this.value
  }
}
</script>
<style lang="scss" scoped>
</style>